请问怎么在编程软件"Python"中打出8123的英语"eight one two three".
来源:百度知道 编辑:UC知道 时间:2024/07/02 11:39:34
table=["zero","one","two","three","four","five","six","seven","eighe","nine"]
for i in (8,1,3,2):
print table[i],
print ("eight one two three")
dict_ = {'0':'zero','1':'one','2':'two',...}
def num2word(numStr):
print(' '.join([dict_[d] for d in numStr]))
> num2word('8123')
eight one two three
print "eight one two three"